<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <link href="./dist/bootstrap.min.css" rel="stylesheet">
  <link href="./dist/highlight/styles/default.css" rel="stylesheet">
  <link href="./dist/highlight/styles/vs2015.css" rel="stylesheet">
  <script src="./dist/jquery-1.12.4.js"></script>
  <script src="./dist/highlight/highlight.pack.js"></script>
</head>
<body>
  <div class="container">
  <h3>请输入代码</h3>
  	<p>
    <textarea style="width:100%" rows="20" id="ts">import sys
import numpy as np 
class Ticket():
	def __init__(self, checi, fstation, tstation, fdate, ftime, ttime):
		self.checi = checi
		self.fstation = fstation
		self.tstation = tstation
		self.fdate = fdate
		self.ftime = ftime
		self.ttime = ttime
	def printinfo(self): 
		str = "(车次：" + self.checi+")(出发站："+self.fstation+")(到达站："+self.tstation+")(出发时间："+self.fdate+")"
		return str
a2 = Ticket("T11", "xian", "beijing", '2019-01-21', '13:00', '19:00')
values = a2.printinfo()
print(values)
x = np.empty([3,2], dtype = int) 
print (x)</textarea>
    </p>
    <!--  
	<pre><code class="python">
import sys
import numpy as np 
class Ticket():
	def __init__(self, checi, fstation, tstation, fdate, ftime, ttime):
		self.checi = checi
		self.fstation = fstation
		self.tstation = tstation
		self.fdate = fdate
		self.ftime = ftime
		self.ttime = ttime
	def printinfo(self): 
		str = "(车次：" + self.checi+")(出发站："+self.fstation+")(到达站："+self.tstation+")(出发时间："+self.fdate+")"
		return str
a2 = Ticket("T11", "xian", "beijing", '2019-01-21', '13:00', '19:00')
values = a2.printinfo()
print(values)
x = np.empty([3,2], dtype = int) 
print (x)
	</code></pre>-->
	<h3><button onclick="sub()" class="btn btn-default" >提交</button></h3>
	<h3>输出结果</h3>
	<pre id="sp"></pre>
	<br><br>
  </div>
</body>
	<script>
	$(document).ready(function(){
		hljs.initHighlightingOnLoad();
	});
	function sub(){
		hljs.initHighlightingOnLoad();
		//var v = $('#ts').val();
		//$('.python').html(v);
		$.post("./post",
			{content:$('#ts').val()},
			function(result){
		    	$("#sp").html(result);
		 	});
	}
  	</script>
</html>